<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page language="java" contentType="text/html; charset=iso-8859-1" %>
<%@ page import="org.tigr.htc.server.*" %>
<%@ page import="org.apache.log4j.Logger" %>

<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title>Stop Requests</title>
  <link href="../htcserver.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h2>Stop Request</h2>
<%!
  // Get the instance of the command server class
  CommandServer server = CommandServer.getInstance();
  static private Logger logger = Logger.getLogger("stop_requests");
%>
<%
    
  logger.debug(request.getParameterMap());
  String [] stopIDs = request.getParameterValues("checked");  
  String stopSubmit = request.getParameter("stopSubmit");

  // search form was submitted so look for the criteria to build
  // the where and order by clause
  if((stopSubmit != null) && stopSubmit.equals("t") && 
      (stopIDs != null)) {
    for (int i = 0; i < stopIDs.length; i++) {
      server.stop(stopIDs[i]);
%>
Stopping HTC Request with ID: <%= stopIDs[i] %><br>
<%
    }
  }
%>
<%@include file="admin_footer.jsp"%>
</body>
</html>
